The SCUBA-2 Cosmology Legacy Survey: 850 μm maps, catalogues and number counts