When you use an aggregate function such as Count (or Sum, average, standard deviation...) it computes a total from the set of all related records. If you want a total of all patients with the value of "Active" and "yes", you would need to use a relationship that matches to only the records with those values. Such a relationship is possible to set up if you use a pair of calculation fields as match fields so that you get relationship that only matches to records of those values.
But that's not the only way you can get that figure. You could also perform a find on your patients table specifying those criteria and your found count would then be the figure that you need.
And yes, executeSQL is one option for getting a selective count of the records in a table.