The electroscope can be considered a capacitor with capacity $C$, so it will carry a charge $Q = UC$ if we apply a voltage $U$. This means that the needle and the support strut will carry $Q$ and the case will carry the opposite charge.
The equal sign charge carried by the needle and the strut repels and equilibrates with the gravity (and constraint forces). So the amount of charge deposited on the needle and the strut determines the magnitude of the deflection of the needle (as this amount of charge determines the strength of the electrostatic force via Coulomb's law).
Note, that the capacity of the electroscope is not changed much by the movement of the needle (as the case is still far away from the needle).
So, actually, an electroscope always measures the voltage applied to its terminals, or equivalently (connected by the electroscopes capacity) the charge transferred to the electroscope, but never directly the charge carried by some capacity it is connected to.
As to your specific situation and the question about the constance of the charge: The charge on the plates of the capacitor actually change as well (although minutely, as the capacity of the electroscope will be small compared to the capacity of the capacitor). The voltage on the capacitor and the electroscope equilibrate, therefore charges are transferred to/from the electroscope until the voltages are equal (that is, the equilibrium state is given by solution of the equations: $Q_1/C_1 = Q_2/C_2$ and $Q_1 + Q_2 = Q$, where $Q$ is the original charge on the capacitor, before we connected the electroscope).
From this consideration follows as well, that an electroscope effectively measures charge, when for example charged from a plastic rod rubbed with cloth. The plastic rod has a capacity far lower than the electroscope, so nearly all charge will be transferred the the electroscope (and the voltage will drop drastically, in other words the rod is not nearly an ideal voltage source). So after collecting all the charge from the rod, you will effectively measure the amount of charge generated by the triboelectric effect.
By definition, capacitance measures the ability of a system to hold charge. Mathematically, it can be stated as the amount of charge the system can hold per unit potential difference across it.
$$CV = q \tag{1}$$
where $V$ is the potential difference (or potential) of the system, $C$ is the capacitance of the system and $q$ is the charge stored in the system.
An electric field is what causes a change in potential. The relationship between the change in electric potential and the electric field its simplest form can be expressed as follows:
$$V = E.d \tag{2}$$
Consider a parallel plate capacitor. If you keep the amount of charge on the system constant and then reduce the distance between the plates, the potential across the capacitor decreases. As the electric field between the plates depends solely on the surface charge density (assuming that the plates are very large), from equation $(2)$, you can infer that $V$ decreases as $d$ decreases. Therefore, you are holding the same amount of charge for a smaller potential difference. Aha! The capacitor is now able to store more charge per unit potential, therefore its ability to hold charge, that is capacitance, has increased.
Best Answer
In most capacitors (including the simple parallel plate capacitor, which is the one you refer to), changing the applied voltage simply results in more charge being accumulated on the capacitor plates, and has no effect on the capacitance.
A capacitor is nothing more than two conductors which are separated from each other by a dielectric material of some kind. When a voltage is applied across a capacitor, a certain amount of charge builds up on the two conductors. The amount of charge which accumulates is a function of the voltage applied - $Q=Q(V)$. The capacitance is then defined by $C = \frac{Q}{V}$.
Under most conditions, the capacitance ends up being purely a function of geometry. In the case of the parallel plate capacitor, one finds that
$$ Q(V) = \frac{\epsilon_0 A V}{d}$$ so $$ C \equiv \frac{Q}{V} = \frac{\epsilon_0 A}{d}$$
The capacitance therefore depends on the area of the plates and the distance between them - nothing else.
It's worth noting that one could construct a device which has a more complicated, voltage-dependent capacitance. For example, one could consider a parallel plate capacitor where the plates are held apart by electrically insulated springs. In that case, the distance separating the plates would depend on the electrostatic attraction between the plates, which is determined by the applied voltage. Increasing the voltage would result in a larger charge buildup, which would cause greater attraction between the plates, which would further compress the springs, which would increase the capacitance. Working this out explicitly is an interesting exercise.
But again, for a simple case like the one under consideration in your example, the capacitance is merely a geometrical constant.