For situation’s like pepelsbey’s, where the number of posts on the page might be less than $posts_per_page, you can check against the length of the $posts array rather than $posts_per_page:
<?php
$postCount = 0;
// Start of The Loop
if (++$postCount == 1) {
// FIRST POST
}
if ($postCount == sizeof($posts)) {
// LAST POST IN LOOP
}
// End of The Loop
?>