Generalized subdifferentials of the rank function

We give an explicit formula for the generalized subdifferentials; i.e. the proximal subdifferential, the Fréchet subdifferential, the limitting subdifferential and the Clarke subdifferential of the counting function. Then, thanks to theorems of A.S. Lewis and H.S. Sendov, we obtain the corresponding generalized subdifferentials of the rank function.