I'm trying to use the Count function for this purpose, but it's not working how I'd like it to. Does anybody know a simple way to do this counting?
I would like to be counting the number of "p"s in expressions like
I would like the count to return 2 on the first one (even though one of the p's has a squared term), and 1 on the second.
edit: I realized for the purpose of counting I can remove the "square" so the first expression would just look like
if that makes it any easier.