add optional filter func to getNumberOfAtoms()

[#44621785]

Prototype for discussion ..

Example: returns number of atoms with element == 3

  getNumberOfAtoms('element[i] == 3')