Why the number 6 in P6SM in a METAR/TAF?
The METAR format is defined by the World Meteorological Organization's (WMO)  on behalf of ICAO. According to the specification (section 15.6.3), visibility is to be reported in meters. The upper bound for visibility reporting is 9999, which indicates the visibility exceeds 10 kilometers. 

In North America, the METARs deviate from the standard format by using non-standard units. Visibility is reported in statue miles. Six statue miles is equivalent to 10 kilometers.

Hence > 6 statue miles is equal to the standard > 10 kilometers.