Added function  for count users filtered by metadata