A method for detecting an analyte in a sample, the method comprising the steps of: (i) providing a mixture comprising a fluid sample and a reporter reagent to a device, the device comprising a substrate having an optical component and a binding component attached to a surface of the substrate, wherein the substrate is located in a chamber having one or more side walls, an upper surface and a lower surface, wherein the chamber holds the sample, and the sample containing the analyte is in contact with the substrate, and wherein the substrate is positioned above the bulk solution on the upper surface of the chamber, with the optical and binding components being on the interior surface of the chamber contacting with the sample; (ii) allowing a proportion of the reporter reagent to bind to the surface of the substrate in proportion to the concentration of the analyte, by means of the binding component; (iii) irradiating the device with electromagnetic radiation for absorption by a photosensitiser of the reporter reagent, such that the photosensitiser of the bound reporter reagent portion interacts with the optical component to cause the optical component to change from a first optical state to a second optical state, thereby forming a set of local regions of the optical component having the second optical state on the substrate, wherein the optical component when in the first optical state is fluorescent and the optical component when in the second optical state is non-fluorescent, and wherein the change from the first optical state to the second optical state is irreversible; and (iv) detecting the set of local regions having the second optical state on the substrate, wherein local regions having the second optical state are counted as individual binding events. (i) providing a mixture comprising a fluid sample and a reporter reagent to a device, the device comprising a substrate having an optical component and a binding component attached to a surface of the substrate, wherein the substrate is located in a chamber having one or more side walls, an upper surface and a lower surface, wherein the chamber holds the sample, and the sample containing the analyte is in contact with the substrate, and wherein the substrate is positioned above the bulk solution on the upper surface of the chamber, with the optical and binding components being on the interior surface of the chamber contacting with the sample; wherein the substrate is located in a chamber having one or more side walls, an upper surface and a lower surface, wherein the chamber holds the sample, and the sample containing the analyte is in contact with the substrate, and wherein the substrate is positioned above the bulk solution on the upper surface of the chamber, with the optical and binding components being on the interior surface of the chamber contacting with the sample; (ii) allowing a proportion of the reporter reagent to bind to the surface of the substrate in proportion to the concentration of the analyte, by means of the binding component; (iii) irradiating the device with electromagnetic radiation for absorption by a photosensitiser of the reporter reagent, such that the photosensitiser of the bound reporter reagent portion interacts with the optical component to cause the optical component to change from a first optical state to a second optical state, thereby forming a set of local regions of the optical component having the second optical state on the substrate, wherein the optical component when in the first optical state is fluorescent and the optical component when in the second optical state is non-fluorescent, and wherein the change from the first optical state to the second optical state is irreversible; and wherein the optical component when in the first optical state is fluorescent and the optical component when in the second optical state is non-fluorescent, and wherein the change from the first optical state to the second optical state is irreversible; and (iv) detecting the set of local regions having the second optical state on the substrate, wherein local regions having the second optical state are counted as individual binding events.