State laws for HOV (high occupancy vehicle) and carpool lanes differ however normally a child does count as an occupant. With certain exceptions, carpool lanes are reserved for vehicles carrying multiple occupants.
An occupant is typically defined as any person who occupies one seat in the vehicle. So both a newborn infant in an infant car seat or a 2-year-old child in a child seat would usually count as occupants so that you could drive in a carpool lane. Pregnant mothers count as one occupant though because they only occupy one seat in a vehicle.