In this paper we construct a family of variational families for a Legendria
n embedding, into the 1-jet bundle of a closed manifold, that can be obtain
ed from the zero section through Legendrian embeddings, by discretising the
action functional. We compute the second variation of a generating functio
n obtained as above at a nondegenerate critical point and prove a formula r
elating the signature of the second variation to the Maslov index as the me
sh goes to zero. We use this to prove a generalisation of the Morse inequal
ities thus refining a theorem of Chekanov.