count rows in subform

count rows in subform

What am I doing wrong?  I just want to count the total number of records in the subform that meet a certain criteria and input that count into a field on the main form.

input.fieldinmainform = count(Subform[fieldinsubform == "LBR"]);