adding getCount to functions