Hazrat Imran bin Hadeer used to count verses during prayer. Hazrat Abu Mijlaz also considered this permissible.