Persistent Systems Interview Question

Calculate spaces and alphabates in the given string.