Yes, you would say "stromy byly" in a normal sentence, but in this question the verb has to agree with the kolik pronoun, so "bylo". Notice stromů is in genitive so it can't be the subject of the sentence.
There are sentences where the object of kolik is at the end of the sentence (Kolik chceš mít vlastních dětí). Can this be done here, “Kolik tady bylo z těch dvaceti třech stromů”? I tried it and it was rejected, or I may have another error.