In this paper we show an Arakelov inequality for semi-stable families of algebraic curves of genus $ggeq 1$ over characteristic $p$ with nontrivial Kodaira-Spencer maps. We apply this inequality to obtain an upper bound of the number of algebraic curves of $p-$rank zero in a semi-stable family over characteristic $p$ with nontrivial Kodaira-Spencer map in terms of the genus of a general closed fiber, the genus of the base curve and the number of singular fibres. An extension of the above results to smooth families of Abelian varieties over $k$ with $W_2$-lifting assumption is also included.