When counting protein macros do you count the protein within a carb source for example pasta? Or do you only count protein from direct sources such as meat,eggs etc?
It's more of a question of whether or not the protein source has a complete amino acid profile. If not, then it would depend on if you are consuming the other essential AAs along with it from other sources. If you were just consuming nuts for example exclusively for protein then I would think that yes it would have caloric significance but not provide you with ample protein for actual protein requirements. If you consume different types and are concerned only about caloric significance, then yes, track it.
Some protein sources (typical plant based, nuts, legumes and grains) have an incomplete protein source. This means that they do not include all 9 essential amino acids as do sources like meat, dairy, eggs, etc. Further, this means that they do not have biological significance when it comes performing the duties of protein in the body such as cellular and muscular repair, as well as energy in the absence of carbohydrate (glucose in the blood or lack of stored glycogen, both in the liver and muscle). Fortunately, if you are a vegan or vegetarian and are at risk of inadequate protein, a good majority of incomplete protein sources can be stacked together to make a complete source, and thus have biological significance.