In ice hockey, an assist is attributed to up to two players of the scoring team who shot, passed or deflected the puck towards the scoring teammate, or touched it in any other way which enabled the goal, meaning that they were "assisting" in the goal. There can be a maximum of two assists per goal. The assists will be awarded in the order of play, with the last player to pass the puck to the goal scorer getting the primary assist and the player who passed it to the primary assister getting the secondary assist. Players who gain an assist will get one point added to their player statistics.
Assist (ice hockey) Wikipedia
If a player scores off a rebound given up by a goaltender, assists are still awarded, as long as there is no re-possession by that goaltender, meaning he did not have complete control of the puck.
However, a rule says that only one point can be credited to any one player on a goal scored. This means one player cannot be credited with a goal and an assist for the same goal scored; instead the player would only get credit for a goal and a different player may get credit for an assist, if applicable. It also means that one player cannot be credited with two assists for the same goal scored; instead the player would only get credit for one assist and a different player may get credit for the other assist, if applicable.
Additionally, if a player passes the puck to another player who then completes a give-and-go with a different player for a goal, the player who made the pass that set up the goal gets the primary assist, and the player who passed to the eventual goal scorer before the give-and-go took place gets the secondary assist. This is essentially because assists are to be awarded to the last (up to) two players of the scoring team who had possession of the puck before the eventual goal scorer had possession and ultimately scored, regardless of whether that eventual goal scorer had possession at any time in between the two other players. This also means that possession of the puck can go from and in between the eventual goal scorer and eventual assist getters an infinite amount of times, and this scoring standard will still be applied. The no change in team possession guideline still applies to these particular cases.