Concerning the number of toes. Some pterosaurs had 4-toed feet, like birds.
However, a large number of [pterodactyloid?] pterosaur trackways were later found with a distinctive four-toed hind foot and three-toed front foot.
The animal has been named Nemicolopterus crypticus, the fossil shows a number of adaptations for a life amongst the tress. For example, the eye sockets are quite large, indicating that this Pterosaur could have coped well with low light levels in the understorey of a dense primeval forest. The four-toed hind feet had sharp claws, which could possibly have been able to grasp branches, giving this tiny flying reptile a good purchase amongst the tree tops.
Furthermore, the phalangeal proportions of the digits of Dimorphodon and other basal pterosaurs are similar to those of birds with grasping feet (that is, perching, climbing,and raptorial species) and unlike those of primarily ground-living birds, bipedal dinosaurs and the primitive dinosauromorphs Lagerpeton and Marasuchus (Fig. 5). The similarity of the foot of D. weintraubi to that of other basal pterosaurs15,24 suggests that the features outlined here are primitive features of the group. The lack of cursorial adaptations in the foot of D. weintraubi contradicts the reconstruction of basal pterosaurs as rapidly moving, digitigrade cursors2,3. On the contrary, the capacity for grasping exhibited by this foot and the similarity of its phalanges to those of birds with grasping feet indicates that basal pterosaurs may have been scansorial and, perhaps, arboreal1,14,15.
Unwin, D. M. (2006). The Pterosaurs from Deep Time. Pi Press, New York, NY.
Pterosaurs, or at least rhamphorhychoids, were scansorial and probably rarely ventured to the ground. In fact, according to David Unwin, no confirmed rhamphorhychoid trackways have ever been found. Perhaps, given the extremely limiting connections of the rhamphorhychoid wing membranes, being grounded meant getting eaten.