Constraining the Structure of Gamma-Ray Burst Jets through the logN-logS Distribution