new find and count function