Write a function that accepts a string, if the string is a single word, return the number 1. Otherwise, use synchronous error handling techniques to respond to strings that have more than one word. Demonstrate your error handling.
Update the previous exercise to instead use a callback to deliver an error.