count both types of instances