first version of logic.php - working count and uppercase