Statistics for Enumeration of binary strings and applications to compositions and partitions