countFunction