I need a formula that will do the following:

If text is in a certain cell display the number 1 if not display the number 2 (I was able to accomplish this with the formula (IF(ISTEXT(A1),"1","0"), after this value is configured, I want to add up the total number of 1s, to display in another cell, I tried to do a simple "=sum(B1:B20)" but the excel is not recognizing the 1 and 0 as numbers (I also tried formatting the cells for numbers but this didn't work either.

My objective: I want to record and total the number of objects in a collection, I thought each time I entered the name of one of the object in column A, a 1 would populate in the hidden B column, then I'd do a sum of the B column to get my total number of objects.

My Problem: Sumn does not recognize the IF(ISTEXT) formula value as a number.

Can my original concept work or should I try another method?

I've attached a sample file, you may need to unhide the B column.