Joey bought cupcakes for his sister's birthday party. 90% of the 50 cupcakes had sprinkles on top. How many cupcakes had sprinkles?