you can also try it like this
=SUMPRODUCT(--((FIND("]",A1:A17&"[]")-FIND("[",A1:A17&"[]"))=6),B1:B17)