1. A method for determining the number and spatial locations of a plurality of targets in a sample, comprising: stochastically barcoding the plurality of targets in the sample using a plurality of stochastic barcodes, wherein each of the plurality of stochastic barcodes comprises a spatial label and a molecular label; estimating the number of each of the plurality of targets using the molecular label; and identifying the spatial location of each of the plurality of targets using the spatial label.