We can categorize the different numbers into groups using a counting method called Caseworks.

The thousands digit is set to be 5, since there are no other numbers between 5000-6000 who have thousands digits that aren't 5.

The first category is adding 1's and 2's to make 5.

5122, 5212, and 5221 are all items in the first category.

The second category is adding 1's and 3's

5131, 5113, and 5311 are items in the second category.

The third category is adding 1's and 4's.

5140, 5104, 5014, 5041, 5401, and 5410 are all items in this category.

The 4th category is adding 2's and 3's.

5230, 5203, 5302, 5320, 5023, and 5032 are all items in the 4th category. (Do you sense a pattern regarding Combinatorics?)

There is a pattern regarding the different categories that allows you to finish this without counting everything, though we already have counted everything. Try to find it!

Now we can look at all the numbers we counted and count them. 3 + 3 + 6 + 6 = 18, so there are 18 of them.